#include <iostream>
#include <string>
#include <vector>
#include <functional>

void print(const std::string& str, int num)
{
    std::cout << str << " " << num <<  std::endl;
}

int main()
{
    using Task = std::function<void()>;
    std::vector<Task> arry;
    arry.push_back(std::bind(print, "hello", 20));
    arry.push_back(std::bind(print, "hello", 30));
    
    for(auto &f : arry) {
        f();
    }


    // print("hello!");
    auto func = std::bind(print, "hello", std::placeholders::_1);
    func(10);

    return 0;
}